package daobeauty.dao;

import org.hibernate.CacheMode;

// TODO use / integrate
public class Caching {
	public static final Caching NO_CACHING = new Caching(false);
	
	private boolean cachable = true;
	private String cacheRegion = null;
	private CacheMode cacheMode;
	
	
	
	public Caching(boolean cachable, String cacheRegion, CacheMode cacheMode) {
		super();
		this.cachable = cachable;
		this.cacheRegion = cacheRegion;
		this.cacheMode = cacheMode;
	}
	
	public Caching(String cacheRegion, CacheMode cacheMode) {
		super();
		this.cacheRegion = cacheRegion;
		this.cacheMode = cacheMode;
	}

	public Caching(String cacheRegion) {
		super();
		this.cacheRegion = cacheRegion;
	}
	
	public Caching(CacheMode cacheMode) {
		super();
		this.cacheMode = cacheMode;
	}
	
	public Caching(boolean cachable) {
		super();
		this.cachable = cachable;
	}

	public boolean isCachable() {
		return cachable;
	}
	
	public String getCacheRegion() {
		return cacheRegion;
	}
	
	public CacheMode getCacheMode() {
		return cacheMode;
	}
}
